package date;

import java.util.Calendar;

/**
 * created by flyketch
 * 19-12-1 下午8:00
 */
public class DateTest {
    public static void main(String[] args) {
        Calendar calendar = Calendar.getInstance();
        int year = calendar.get(Calendar.YEAR);
        int month = calendar.get(Calendar.MONTH) + 1;
        int day = calendar.get(Calendar.DATE);
        System.out.println(year + "," + month + "," + day);

        calendar.add(Calendar.DAY_OF_MONTH, 10);
        int newYear = calendar.get(Calendar.YEAR);
        int newMonth = calendar.get(Calendar.MONTH) + 1;
        int newDay = calendar.get(Calendar.DATE);
        System.out.println(newYear + "," + newMonth + "," + newDay);
    }
}
